
macro(add_unit_test file)
    get_filename_component(name ${file} NAME_WE)
    add_executable(${name} ${file} ${ARGV2})
    target_link_libraries(${name} PRIVATE gtest gtest_main pthread ${ARGV1})
    target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../)
    add_test(
            NAME ${name}
            COMMAND ${name}
    )
endmacro(add_unit_test file)

file(GLOB_RECURSE cpps "./server_context/*.c*")
foreach (file ${cpps})
    add_unit_test(${file})
endforeach (file)
add_subdirectory(function_execution)
